#ifndef FOR_STATEMENT_H
#define FOR_STATEMENT_H
#include "AstNode.h"
class AstNodeForStatement : public AstNode
{
  public:
    AstNodeForStatement(u2 cycleVariableIndex,
        AstNodeExpression * startExpression,
        AstNodeExpression * endExpression,
        AstNodeExpression * step,
        AstNodeStatementList * body);


    virtual void dump();
    virtual int  compile(ClassFile * klass, MethodInfo * method);
  private:
    /*for( start_statement;  cond;  next_iter_statement )
      body;*/
    // start statement
    AstNodeAssignment
      * startStatement; // cycleVariableLValue = startExpression

    // condition
    AstNodeCompareExpression * cond;       // cycleVariableExpression <= endExpression

    // next_iter_statement 
    AstNodeAssignment * nextIterStatement; // cycleVariableLValue = cycleVariableExpre '+' step

    // body
    AstNodeStatementList * body;

};
#endif
